//
//  MainController.m
//  testTry
//
//  Created by apple on 2017/2/26.
//  Copyright © 2017年 CollectionView. All rights reserved.
//

#import "MainController.h"

@interface MainController ()

@end

@implementation MainController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UINavigationController *homeVC = [self createControllersWithName:@"HomePageCpntroller"];
    UINavigationController *storeVC = [self createControllersWithName:@"StoreController"];
    UINavigationController *managerVC = [self createControllersWithName:@"ManagerController"];
    UINavigationController *MineVC= [self createControllersWithName:@"MineController"];
    
    
    homeVC.tabBarItem.title = @"首页";
    storeVC.tabBarItem.title =@"商店";
    managerVC.tabBarItem.title = @"管理";
     MineVC.tabBarItem.title = @"我的";
    
    
   
    self.viewControllers = @[homeVC,storeVC,managerVC,MineVC];
    
    
    
    
    

}



-(UINavigationController*)createControllersWithName:(NSString *)name{
    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:name bundle:nil];
    
    UINavigationController *navc= [storyBoard instantiateInitialViewController];
    
    return navc;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




@end
